home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / qdhelp.zip / SOUND.QDH < prev    next >
Text File  |  1992-12-26  |  3KB  |  102 lines

  1. //
  2. // SOUND.QDH
  3. // This is a sample QDHELP file which shows you how to play
  4. // .wav files from inside you help file. It is just too cool!
  5. // 
  6. //
  7.  
  8. //
  9. // set up the options for the .hpj file
  10. //
  11.  
  12. /hpjoption COPYRIGHT,Copyright Phil Allen 1991-1992
  13. /hpjoption REPORT,ON
  14. /hpjoption TITLE,TEMPLATE FOR WIN 3.1
  15.  
  16. /hpjconfig BrowseButtons()
  17. /hpjoption CONTENTS,TPLATE_INDEX
  18.  
  19. //
  20. // Register the routine that plays sounds for us
  21. //
  22.  
  23. /hpjconfig RegisterRoutine("MMSYSTEM","sndPlaySound","Si")
  24.  
  25. //
  26. // start of topics
  27. //
  28.  
  29. /topic TPLATE_INDEX
  30.  
  31.     /title QDHELP Sound Demo
  32.  
  33.     /defformat \sa150
  34.     
  35.     /para
  36.     /text \b\i\fs50,QDHELP Sound Demo
  37.     /endpara
  38.  
  39.     /para \fi200
  40.     This is a demonstration of how to play a sound file from within
  41.         WINHELP using QDHELP.  You need QDHELP Version 2.0 or later to
  42.         compile the .QDH source file to build this help file.
  43.     /endpara
  44.  
  45.     /para \fi200 
  46.         The following hypertext link will play the included wave file
  47.         syncronously.  That means it will start playing it and will not
  48.         return until it has finished playing the entire file.
  49.     /endpara
  50.  
  51.     /para
  52.     /macrolink Play that Thing Sync,sndPlaySound(`qdhelp.wav',0)
  53.     /endpara
  54.  
  55.     /para \fi200 
  56.         The following hypertext link will play the included wave file
  57.         asyncronously.  That means it will start playing it and return
  58.         prior to finishing.
  59.     /endpara
  60.  
  61.     /para
  62.     /macrolink Play that Thing Async,sndPlaySound(`qdhelp.wav',1)
  63.     /endpara
  64.  
  65.         /para \fi200
  66.         The following hypertext link will play a wave file over and
  67.         over and over again until you hit Stop sound hypertext link
  68.         below.
  69.         /endpara
  70.  
  71.         /para
  72.         /macrolink Play that Thing Loop!,sndPlaySound(`qdhelp.wav',9)
  73.         /endpara
  74.  
  75.         //
  76.         // this is a kludge since we should pass NULL as the file name
  77.         // to stop the sound.  Unfortunetly WINHELP does not seem
  78.         // to want to let us pass anything but a string and "" does
  79.         // not work since it is a empty string The routine wants
  80.         // 0 passed in as the address of the string.  In terms of
  81.         // C it whats (char *)NULL
  82.         // oh well
  83.  
  84.         /para
  85.         /macrolink Stop that Thing NOW,sndPlaySound(`qdhelp.wav',0)
  86.         /endpara
  87.  
  88.     /para
  89.           The following bitmap will play your SystemStart sound defined
  90.           in your WIN.INI file. If there is no SystemStart sound it will
  91.           play the SystemDefault sound also in the WIN.INI under the
  92.           [sounds] section.  If there is not SystemDefault then no sound
  93.           will be played.
  94.         /endpara
  95.  
  96.     /para
  97.       /bitmap l,sound.shg
  98.         /endpara
  99.  
  100. /endtopic
  101.  
  102.